import request from '@/utils/request.ts'
import {DeleteMaterialImageByIdRes, MaterialPageQueryReq, MaterialImagePageQueryRes} from "@/api/media/type.ts";

/**
 * 分页查询素材列表
 */
export const pageQueryReq = (data: MaterialPageQueryReq) => request.post<MaterialPageQueryReq, MaterialImagePageQueryRes>('/media/material/pageList', data)

/**
 * 根据id删除素材
 */
export const deleteByIdReq = (id: number) => request.delete<number, DeleteMaterialImageByIdRes>(`/media/material/${id}`)
